package com.yijiupi.plugin.test.toolwindow;

import com.intellij.openapi.project.Project;
import com.intellij.openapi.wm.ToolWindow;
import com.intellij.openapi.wm.ToolWindowFactory;
import com.intellij.ui.content.Content;
import com.intellij.ui.content.ContentFactory;
import org.jetbrains.annotations.NotNull;

public class SqlToolWindowFactory implements ToolWindowFactory {

    @Override
    public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) {
        ContentFactory contentFactory = ContentFactory.SERVICE.getInstance();
        SqlToolsWindow sqlToolsWindow=new SqlToolsWindow(project);
        Content content= contentFactory.createContent(sqlToolsWindow.getjPanel(),"xxx",false);
        toolWindow.getContentManager().addContent(content);
    }

}
